home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / os2 / commo70.zip / SAMPLES.MAC < prev    next >
Text File  |  1996-08-24  |  11KB  |  288 lines

  1.                   ┌───────────────────────────┐
  2.                   │ Additional Macro Examples │
  3.                   └───────────────────────────┘
  4.  
  5. This file contains a number of sample macros.  They may need to be modified to
  6. work for you.  Feel free to copy any of them to COMMO.MAC or to an auxiliary
  7. Macro File.
  8.  
  9.  
  10.  Macros used with external Zmodem drivers
  11.  ───────────────────────────────────────────────────────────────────────────
  12.  
  13. For OMEN Technology programs, add the following macros at the top of COMMO.MAC
  14. (if necessary, substitute "dsz.com" or "dsz.exe" for "gsz.exe"):
  15.  
  16.   {:z_recv}
  17.   {exec-d %protodir\gsz.exe portx %_pad,%_irq ha both rz -mr %pr_down}
  18.   {call ring_alarm} {retu}
  19.  
  20.   {:z_send}
  21.   {exec-d %protodir\gsz.exe portx %_pad,%_irq ha both sz -mr %pr_file}
  22.   {call ring_alarm} {retu}
  23.  
  24. For TEXAS Zmodem, add the following:
  25.  
  26.   {:z_recv}
  27.   {exec-d %protodir\txzm.exe -c%_pad,%_irq -l%_spe -b%_mod -h -q -r %pr_down}
  28.   {call ring_alarm} {retu}
  29.  
  30.   {:z_send}
  31.   {exec-d %protodir\txzm.exe -c%_pad,%_irq -l%_spe -b%_mod -h -q -s %pr_file}
  32.   {call ring_alarm} {retu}
  33.  
  34. For other Zmodem drivers, adapt the program's command line to create macros
  35. similar to the above.
  36.  
  37.  
  38.  Exit {COMMO} with prompt (safe exit)
  39.  ───────────────────────────────────────────────────────────────────────────
  40.   {:alx} {info-qs0 Really exit?}
  41.          {ifco ,alxn} {exit} {:alxn} {}
  42.  
  43.  
  44.  Generic login macro
  45.  ───────────────────────────────────────────────────────────────────────────
  46. My generic login macro will login to most popular BBS's.  The generic login
  47. subroutine can be called from mail run macros, etc.  The GOLOok with
  48. ";passwor" ignores the string "password" in the opening instructions on an
  49. Auntie board.  Put {login} in your Dialing Directory macro field.
  50.  
  51.   {:login} {capture y,c:\commo\commo.cap}      RBBS, PCBoard, Auntie, etc.
  52.            {asci ,} {call gls} {}
  53.  
  54.  Generic login subroutine
  55.  ───────────────────────────────────────────────────────────────────────────
  56.   {:gls} {setlook 60,hng,10,|}
  57.          {setv ss_r,~|} {setv ss_yr,~y|}
  58.   {:li1} {sslo ss_r,(enter)}            {sslo ss_yr,graphics (enter)}
  59.          {calo li1,li2,first name}      {calo li1,li3,last name}
  60.          {sslo ss_yr,is this correct}   {golo li1,;passwor}
  61.          {lookfor password}             {send ~%_pas|} {return}
  62.   {:li2} {send ~Firstname|} {return}
  63.   {:li3} {send ~Lastname|} {return}
  64.  
  65.  
  66.  Start mail reader after a mail run
  67.  ───────────────────────────────────────────────────────────────────────────
  68.   {:cf3} {exec-ns slmr} {}                     SLMR Reader w/swap
  69.  
  70.  
  71.  Macros used at session termination
  72.  ───────────────────────────────────────────────────────────────────────────
  73. These two utilities are used in various macros.  "hng" will hangup when
  74. necessary, then "nocar" will wait for carrier detect to drop and continue
  75. dialing numbers that are still marked.
  76.  
  77.   {:hng} {pause 3} {hangup y}
  78.   {:nocar} {pause 1} {ifcarrier nocar} {pause 5} {dial ,} {beep} {}
  79.  
  80.  
  81.  PCBoard generic mailrun
  82.  ───────────────────────────────────────────────────────────────────────────
  83. Here is a macro using variables to do a mail run on a PCBoard with CAM-Mail,
  84. Rosemail, QMail, etc.  It will download only one packet each day and upload a
  85. reply packet if one exists (deleting the packet if the upload is successful),
  86. then log off.
  87.  
  88. This macro should be placed in a separate Macro File.  E.g., PCBMAIL.MAC.
  89.  
  90. Five variables must be set prior to starting this macro.  For convenience,
  91. these can be set in the Dialing Directory entry.  For example, to call Channel
  92. 1 and use the CAM-Mail door, the Dialing Directory entry (all on one line!)
  93. would be:
  94.  
  95.   Channel1        11/06/94  {1 617 354 5776} {password} ...
  96.       ...  {start,pcbmail.mac} {} {bbsid,channel1} {opendoor,mail} ...
  97.       ...  {maildoor,cam-mail} {nomsgs,no new messages} {ptim,3}
  98.  
  99. When a connection is made, {COMMO} will load PCBMAIL.MAC and GOTO the label
  100. "start".  If nodes are labeled "Channel11", "Channel12", etc., they will all
  101. be UNMArked when the macro starts.
  102.  
  103.   {:start}
  104.         {setv ss_r,~|}          Variables for SSLOoks
  105.         {setv ss_y,~y}            (These may be defined in COMMO.SET
  106.         {setv ss_yr,~y|}           using "set" items.  Then they can
  107.         {setv ss_n,~n}             be used in other macros, too.)
  108.         {setv ss_nr,~n|}
  109.         {setv ss_c,~c}
  110.         {setv ss_ee,~~~~^[~^[}
  111.  
  112.         {unmark %bbsid%1,%bbsid%2,%bbsid%3,%bbsid%4,%bbsid%5}
  113.         {setv qwkfil,c:\slmr\store\%bbsid.qwk}
  114.         {capm filter}
  115.         {capt y,c:\cap\%bbsid.%_day} {asci ,}
  116.         {setl 30,hng}
  117.         {sslo ss_ee,press escape}
  118.         {sslo ss_ee,<esc> twice}
  119.         {golo ,pcboard (r)}
  120.         {look ^g}
  121.         {call gls}
  122.         {setl 60,hng,%ptim,n|}
  123.         {sslo ss_r,to continue}
  124.         {sslo ss_nr,(enter)=yes?}
  125.         {sslo ss_nr,(H)elp, More?}
  126.         {sslo ss_c,(C)ontinue}
  127.         {golo ,channel 1 command?}
  128.         {look main board command?}
  129.         {setl 120,hng}  ** turn off prompt timer
  130.         {send open %opendoor|}
  131.         {look %maildoor command}
  132.         {file %qwkfil} {ifco ,mr_dl}
  133.         {comp _ffd,%_dat} {ifco mr_ul}   ** only one .QWK per day
  134.   {:mr_dl}
  135.         {send d|}
  136.         {golo mr_ul,%nomsgs} {sslo ss_yr,when done?}
  137.         {sslo ss_yr,(y/n)} {sslo ss_yr,receive these}
  138.         {look %bbsid.qwk}
  139.         {call mail_dn} {look %maildoor command}
  140.         {ifex %qwkfil,,mr_dl}  ** if error, try again
  141.   {:mr_ul}
  142.         {ifex %uldir\%bbsid.rep,,mr_gb}  ** if reply, upload it
  143.         {send u|} {look %bbsid.rep} {call mail_up}
  144.         {look %maildoor command} {ifcon ,mr_ul} ** if error, try again
  145.   {:mr_gb}
  146.         {send g|} {goto hng}
  147.  
  148.  
  149.  WildCat! generic mailrun
  150.  ───────────────────────────────────────────────────────────────────────────
  151. The following macro does a mail run on most WildCat! BBS's with the wcMAIL
  152. mail door.  The only variables that need to be set are "bbsid" and "ptim."
  153. The "ss_" variables may be set in the Setup File (using the "set" keyword).
  154.  
  155. This macro should be placed in a separate Macro File.  E.g., CATMAIL.MAC.
  156.  
  157.   {:catmail}
  158.         {setv ss_ee,~^[^[}
  159.         {setv ss_r,~|}
  160.         {setv ss_y,~y}         ** These assume "hotkeys" are set
  161.         {setv ss_n,~n}
  162.         {setv ss_bday,~mm-dd-yy|}      <- your birthdate
  163.         {setv ss_pnum,~614-326-1309|}  <- your phone number
  164.         {setv ss_name,~First Last|}    <- your name
  165.  
  166.         {unmark %bbsid%1,%bbsid%2,%bbsid%3,%bbsid%4,%bbsid%5}
  167.         {setv qwkfil,c:\slmr\store\%bbsid.qwk}
  168.         {capm filter}
  169.         {capt y,c:\cmsg\%bbsid.%_day} {asci ,}
  170.         {setl 60,hng}
  171.         {sslo ss_ee,twice}
  172.         {sslo ss_r,[c]ontinue}
  173.         {sslo ss_name,first name}
  174.         {look password?} {send %_pas|}
  175.         {setl 120,hng,%ptim,|}
  176.         {sslo ss_r,[c]ontinue}
  177.         {sslo ss_r,[enter]}
  178.         {sslo ss_n,choice? [ ]}
  179.         {sslo ss_bday,birth date}
  180.         {sslo ss_pnum,phone number}
  181.         {sslo ss_n,bulletin menu?}
  182.         {golo ,push a key}              ** Various main menu prompts
  183.         {golo ,your command}
  184.         {look main menu:} {send ~~m}
  185.         {golo ,push a key}              ** Various message menu prompts
  186.         {golo ,your command}
  187.         {look message menu:} {send ~~d}
  188.   {:wc_md}
  189.         {setl 120,hng}  ** turn off prompt timer
  190.         {sslo ss_r,[c]ontinue}
  191.         {golo ,tomcat menu}
  192.         {look wcmail command}
  193.         {file %qwkfil} {ifco ,wc_dl}
  194.         {comp _ffd,%_dat} {ifco wc_ul}   ** only one .QWK per day
  195.   {:wc_dl}
  196.         {pause 1} {send d}
  197.         {golo wc_ul,nothing found}
  198.         {sslo ss_y,receive this packet}
  199.         {look %bbsid.qwk now}
  200.         {call mail_dn}
  201.         {golo ,tomcat menu}
  202.         {look wcmail command}
  203.         {ifex %qwkfil,,wc_dl}  ** if error, try again
  204.         {exec-n c:\slmr\weldel.bat %bbsid}      ** delete welcome, etc.
  205.   {:wc_ul}
  206.         {ifex %uldir\%bbsid.rep,,wc_bye}  ** if reply, upload it
  207.         {pause 1} {send u}
  208.         {look %bbsid.rep} {call mail_up}
  209.         {golo ,tomcat menu}
  210.         {look w